package com.lk.remote;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 *  回调工厂
 * @author : lk
 * @date 2021/11/24 12:40
 **/
@Component
public class OrderFallFactory implements FallbackFactory<OrderRemoteFeign> {

    @Override
    public OrderRemoteFeign create(Throwable throwable) {

        return new OrderRemoteFeign() {
            @Override
            public String test() {
                return "远程调用失败";
            }
        };
    }
}
